﻿

@using System.Globalization;
@{
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

@using (Html.BeginForm("Index", "SponsorPack", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-inline" }))
{
    <div id="wrapper">
        <div class="row">
            <h3 class="page-header">Cấu hình</h3>
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <div class="panel-body">
                    <div class="dataTable_wrapper">
                        <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                            <thead>
                                <tr style="font-family:'Times New Roman'">
                                
                                    <th>PerCent</th>                                 
                                    <th>Sửa</th>                               
                                </tr>
                            </thead>
                            <tbody >
                                @{ int j = 0;}
                                @foreach (var item in ViewBag.PackaConfig)
                                {
                                    j++;
                                    <tr>
                                       
                                        <td>@item.Percent</td>                                      
                                        <td><a href="@Url.Action("UpdateSponserPackConfig", "SponsorPack", new { id = item.Id })">Sửa</a></td>                                      
                                    </tr>
                                }
                            </tbody>

                        </table>
                    </div>              
                </div>

            </div>
        </div>
    </div>
    <script type="text/javascript">
        $('.con').on('click', function () {
            return confirm('bạn có chắc chắn muốn xóa?');
        });
    </script>
    <script>
        $(document).ready(function () {
            $('#dataTables-example').DataTable({
                responsive: true
            });
        });
    </script>
}